#!/bin/bash

sum()
{
    echo sum:$#
    REPLY=0
    for var in $*
    do
        #s=$[s+var]
	#((s+=var))
	#: $[REPLY+=var]
	: $[s+=var]
    done
    #return $s
}

sum $*

#echo -n "input number:"
#read -a arr

#sum ${arr[*]}

#sum 1 2 3 4 5
#echo $?
#echo $REPLY
echo $s
